package com.core.dao;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="USERS")
public class User {
    
    long id;
    String name;
    String password;
    String rePassword;
    String fname;
    String mname;
    String lname;
    String emailId;
    String phoneNo;
    String mobileNo;
    String faxNo;
    String officeNo;
    int userType;
    boolean isDeleted;
    
    Set<Address> address;
    
@Id
@GeneratedValue
@Column(name="nm_user_id")
    public long getId() {
        return id;
    }
@Column(name="vc_user_name")
    public String getName() {
        return name;
    }
@Column(name="vc_user_password")
    public String getPassword() {
        return password;
    }
@Column(name="vc_user_fname")
    public String getFname() {
        return fname;
    }
@Column(name="vc_user_mname")
    public String getMname() {
        return mname;
    }
@Column(name="vc_user_lname")
    public String getLname() {
        return lname;
    }
@Column(name="vc_user_email")
    public String getEmailId() {
        return emailId;
    }
@Column(name="vc_user_phoneno")
    public String getPhoneNo() {
        return phoneNo;
    }
@Column(name="vc_user_mobileno")
    public String getMobileNo() {
        return mobileNo;
    }
@Column(name="vc_user_faxno")
    public String getFaxNo() {
        return faxNo;
    }
@Column(name="vc_user_officeno")
    public String getOfficeNo() {
        return officeNo;
    }
@Column(name="nm_user_type")
    public int getUserType() {
        return userType;
    }
@Column(name="nm_deleted")
    public boolean isDeleted() {
        return isDeleted;
    }
    
    
/**
 * Gets list of <code>Address</code>es.
 */
@OneToMany(fetch=FetchType.EAGER)
@JoinColumn(name="PERSON_ID", nullable=false)
 public Set<Address> getAddress() {
        return address;
    }
public void setId(long id) {
	this.id = id;
}
public void setName(String name) {
	this.name = name;
}
public void setPassword(String password) {
	this.password = password;
}
public void setFname(String fname) {
	this.fname = fname;
}
public void setMname(String mname) {
	this.mname = mname;
}
public void setLname(String lname) {
	this.lname = lname;
}
public void setEmailId(String emailId) {
	this.emailId = emailId;
}
public void setPhoneNo(String phoneNo) {
	this.phoneNo = phoneNo;
}
public void setMobileNo(String mobileNo) {
	this.mobileNo = mobileNo;
}
public void setFaxNo(String faxNo) {
	this.faxNo = faxNo;
}
public void setOfficeNo(String officeNo) {
	this.officeNo = officeNo;
}
public void setUserType(int userType) {
	this.userType = userType;
}
public void setDeleted(boolean isDeleted) {
	this.isDeleted = isDeleted;
}
public void setAddress(Set<Address> address) {
	this.address = address;
}
    
    

}
